home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Magazin: Amiga-CD 1997 September & October
/
Amiga-CD 1997 #9-10.iso
/
software
/
fm2_demo
/
rexx
/
tut_fontgroviera.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-10-30
|
3KB
|
102 lines
/******************************************************************/
/* ClassX Amiga Rexx script - Copyright © 1996 ClassX Development */
/******************************************************************/
/*
$VER: TUT_FontGroviera.rexx 1.0
$INF: Esempio guidato per la creazione di un font in stile Groviera.
*/
MYPORT = 'FontMachine'
IF ~SHOW('P', MYPORT) THEN DO
IF EXISTS('FontMachine:FontMachine') THEN DO
ADDRESS COMMAND 'Run >NIL: FontMachine:FontMachine'
DO 30 WHILE ~SHOW('P',MYPORT)
ADDRESS COMMAND 'Wait >NIL: 1 SEC'
END
END
ELSE DO
SAY "FontMachine could not be loaded."
EXIT 10
END
END
IF ~SHOW('P', MYPORT) THEN DO
SAY 'FontMachine Rexx port could not be opened.'
EXIT 10
END
ADDRESS VALUE MYPORT
OPTIONS RESULTS
OPTIONS FAILAT 10000
/******************************************************************/
/* Make sure rexxsupport library is opened */
IF ~SHOW('L','rexxsupport.library') THEN CALL ADDLIB('rexxsupport.library',0,-30)
LockGui
SetAttr "Emboss" 0
SetAttr "Bevel" 0
SetAttr "3D" 0
SetAttr "Shadow" 0
SetAttr "Outline" 0
SetAttr "OutTexture" 0
Request '"Tutorial Message"' '"Example1: the making of a Cheesy font."' 'Ok'
Request '"Tutorial Message"' '"Set resolution to 8 colours"' 'Ok'
Resolution 3
Request '"Tutorial Message"' '"Load the font Balloon, size 100 points."' 'Ok'
LoadFont "Balloon.font" 100
CALL WaitRedraw (FM_RESULT)
Request '"Tutorial Message"' '"Load the front texture: brush Groviera."' 'Ok'
LoadTexture "Front" "Brush" "FontMachine:Brush/Groviera"
CALL WaitRedraw (FM_RESULT)
Request '"Tutorial Message"' '"Set up the right palette."' 'Ok'
EditPal 1 0 0 0
EditPal 2 72 33 0
EditPal 3 145 67 0
EditPal 4 217 100 0
EditPal 5 221 121 0
EditPal 6 222 140 0
EditPal 7 223 159 0
CALL WaitRedraw (FM_RESULT)
Request '"Tutorial Message"' '"Set Random Mapping (RndMap)."' 'Ok'
SetMapMode "SolidMappedRnd"
CALL WaitRedraw (FM_RESULT)
Request '"Tutorial Message"' '"Set 3 pixels Emboss, light from Up-Left."' 'Ok'
SetAttr "Emboss" 3 "UL"
CALL WaitRedraw (FM_RESULT)
Request '"Tutorial Message"' '"Set 8 pixels Shadow, positioned Down-Right."' 'Ok'
SetAttr "Shadow" 8 "DR" 1
CALL WaitRedraw (FM_RESULT)
Request '"ARexx Message"' '"Done."' 'Ok'
UnLockGui
EXIT
/******************************************************************/
WaitRedraw:
ARG Res
/* wait the rendering of the font */
DO WHILE Res ~= 0
CheckRedraw
Res = FM_RESULT
ADDRESS COMMAND 'Wait >NIL: 1 SEC'
END
RETURN
/******************************************************************/